Private Sub Form_Load() 'this sub starts on loading the form
Dim i
Me.Caption = frmDialog.AudioEditor1.DeviceInput.DeviceLines.Name & ": Advanced Properties" 'sets the caption to the device name + "Advance Properties"
For i = 0 To frmDialog.AudioEditor1.DeviceInput.DeviceLines.AdvancedCount
cmbAdvanced.AddItem frmDialog.AudioEditor1.DeviceInput.DeviceLines.AdvancedName(i) 'adds advance option's names to the combo list
Next i
cmbAdvanced.ListIndex = 0
End Sub
Private Sub Check1_Click() 'this sub starts on clicking the Check1 checkbox
If Check1.Value = 1 Then 'if the checkbox is marked then
frmDialog.AudioEditor1.DeviceInput.DeviceLines.AdvancedValue(cmbAdvanced.ListIndex) = True 'sets the advance value to true
Else 'otherwise
frmDialog.AudioEditor1.DeviceInput.DeviceLines.AdvancedValue(cmbAdvanced.ListIndex) = False 'sets the advance avlue to false
End If
If frmDialog.AudioEditor1.DeviceInput.DeviceLines.AdvancedValue(cmbAdvanced.ListIndex) = False Then Check1.Value = 0 Else Check1.Value = 1
End Sub
Private Sub cmbAdvanced_Click() 'this sub starts on clicking
Dim Val 'declares the variable that stoes the advance value types
Val = frmDialog.AudioEditor1.DeviceInput.DeviceLines.AdvancedValue(cmbAdvanced.ListIndex) 'get the advamce value type of the current device
If VarType(Val) = vbBoolean Then 'if the value type is boolean then
Slider1.Visible = False 'hide the slider
Check1.Visible = True 'shows the checkbox
Me.Width = 3750 'sets the form width to 3750
If Val = False Then Check1.Value = 0 Else Check1.Value = 1 'and mark or clear the checkbox
ElseIf VarType(Val) = vbLong Then 'if the value type is Long then
Slider1.Visible = True 'shows the slider
Check1.Visible = False 'hides the checkbox
Me.Width = 5520 'sets the form width to 5520
Slider1.Value = Abs(Val) 'sets the slider value
End If
End Sub
Private Sub Slider1_Click() 'this sub starts on clicking the slider
frmDialog.AudioEditor1.DeviceInput.DeviceLines.AdvancedValue(cmbAdvanced.ListIndex) = Slider1.Value 'sets the advance option value according to the slider one